package com.pphh.demo;

/**
 * test the dynamic load of groovy class in a infinite loop,
 * which helps to check if there is any memory leak or performance issue
 *
 * @author huangyinhuang
 * @date 9/25/2018
 */
public class DynamicPerformance {

    public static void main(String[] args) throws Exception {
        DynamicGroovyStrategy dynamicStrategy = new DynamicGroovyStrategy();
        for (Integer i = 0; i < Integer.MAX_VALUE; i++) {
            dynamicStrategy.run(i.longValue());
            Thread.sleep(10);
        }
    }

}
